package com.qf.config;

import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @version v1.0.0
 * @Description:
 * @author: 姜红凯
 * @date: 2022.02.17
 * @since 1.0
 */
@ControllerAdvice
public class ExceptionAdvice {

    //统一处理异常 未认证，没有权限的时候走这里
    @ExceptionHandler({
            UnauthorizedException.class
    })
    public String unauthorizedUrl(){
        return "/unauthorizedUrl.html";
    }
}
